# -*- coding: utf-8 -*-
"""
@author: wyb
@date: 2024/1/2
@time: 19:48
@desc: 获取知乎问题列表
"""

import requests
from pyquery import pyquery as pq
from bs4 import BeautifulSoup

url = "https://www.zhihu.com/creator/hot-question/hot/0/hour"
headers = {
    'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36'}
html = requests.get(url, headers=headers).text
doc = BeautifulSoup(html, 'lxml')
print(doc.prettify())

# items = doc.select('.css-dpt3mb')
# for item in items:
#     print(item.string)
